﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using blackhouse.Data;
using blackhouse.BlackApart.Data;
using System.Data;

namespace blackhouse.BlackApart.Data.Sql
{
    public class PlaceDataAccess : AdoPlaceDataAccess
    {

        #region Fields

        private string connectionString;
        private MsSqlAdoDataHelper dataHelper;

        #endregion

        #region Constructors

        public PlaceDataAccess(string sqlConnectionString)
        {
            this.connectionString = sqlConnectionString;
            this.dataHelper = new MsSqlAdoDataHelper(this.connectionString);
            SqlVersioning versioning = new SqlVersioning(this.connectionString, this.GetType().Assembly);
        }

        #endregion

        #region AdoPricesDataAccess Members

		protected override IDataReader GetReaderForAllPlaces(string language)
        {
            dataHelper.Reset();
            dataHelper.ProcedureName = "bhp_PlaceGetAll";
			dataHelper.AddParameter("Language", language, DbType.StringFixedLength, 5);
            return dataHelper.Execute();
        }

        #endregion

    }
}
